Skip to content

bi7/01: Biomek i7: ACE boards over USB: framing, messages and read-only discovery - #1641

Open
cmoscy wants to merge 7 commits into
PyLabRobot:mainfrom
cmoscy:bi7/01-ace
Open

cmoscy wants to merge 7 commits into
PyLabRobot:mainfrom
cmoscy:bi7/01-ace

Conversation

@cmoscy

@cmoscy cmoscy commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • First Biomek i7 layer: ACE boards over USB (framing, protocol, discovery).
  • Discovery places boards by module ID; reads only. Generic simulator recording ships with placeholders.

Test plan

  • Framing / protocol / discovery tests pass against the generic recording

… empty cache

Choosing a device by `serial_number` compared it with `dev._serial_number`, which PyUSB fills
only once something has read `dev.serial_number`. Straight after enumeration it is None, so every
device was refused as having no serial number. The serial number is now read through the
descriptor (`dev.serial_number`), and a device without one (`iSerialNumber == 0`) is still refused.
The Biomek tips (T50F, T190F, T230, T1025F, T1070), their 96-tip boxes (BC50F, BC190F, BC230,
BC1025F, BC1070), plates (Thermo96VB_PP, BCFlat96, BCDeep96Square, Thomson_24w_Square_RB, with the
lids Biomek seats on them) and reservoirs (ThermoNUNC_350CB, Reservoir, ModularReservoir),
transcribed from Biomek 5's tip and labware classes.

A tip is a `BiomekTip`, a `Tip` that also carries its cone (the radius at its end and the length
over which it widens); a well is a `BiomekWell`, a `Well` that also carries Biomek's outline of it by
height (`WellSegment`s), from which its height <-> volume table and its wall come. Biomek uses both
to place a tip near a well's wall, as `HamiltonTip` and `TecanTip` carry their instruments' data. A
tip box is a `StandingTipRack` whose tip spots sit on its top face, where the head's mandrels meet
the tips. Each resource carries Biomek's grip point (`preferred_pickup_location`). A resource
library page lists them with their part numbers.
`TipMountingShaft.serialize_state` holds the tool the shaft carries (as it serializes; None for
none), as a tip spot's state holds its tip, and `load_state` puts it back: the saved tip goes onto
the shaft (a tool of the same name held elsewhere in the tree gives way first), and a saved None
takes off the one it carries. State saved before shafts had any leaves the shaft as it is. With
it, `save_state_to_file` / `load_state_from_file` keep the tips a head carries across sessions,
which a device that cannot sense its tips needs.

Tests: a carried tip saved and read back, its own state after it; None taking a tip off; the same
tip staying; a tip of that name held elsewhere giving way.
…covery

The first part of a Beckman Coulter Biomek i7 driver that talks to the instrument's ACE boards
directly over USB (0AB5:ACE0), one board per module: the chassis and one per pod.

- `driver/framing.py`, `board.py`: length-prefixed frames packed into interrupt transfers; a board's
  replies matched to their requests by header, two-stage replies (ACCEPTED, DONE), unsolicited
  messages to subscribers.
- `driver/protocol.py`, `errors.py`: every request the Master Controller was logged sending, plus
  three reads, and nothing else; each field layout as Biomek's `ace_io` log (Log.db3) decodes it.
- `driver/master.py`, `features/chassis.py`, `features/pod.py`, `module.py`: discovery places each
  board by what it reports (Get Module ID: type and side), not by USB order or serial number, then
  reads each module's serial number, its boards with their application images and versions, and
  the names of its inputs, in the order of the Master Controller's cold start. It writes nothing
  to the boards. Unknown types or sides, two boards in one place, and no chassis are refused.
- `driver/simulator.py`, `defaults/`: boards replayed from a cold-start recording; a generic one
  ships, every serial number replaced by a placeholder.

Tests: one exact frame per command (from Biomek's `ace_io` log; three reads it never logged from
their layout), build and parse round trips, framing inverses, the replay's rules, and discovery on
the generic recording. Discovery sends the same requests as on the full driver this series comes
from.
@cmoscy cmoscy changed the title Biomek i7: ACE boards over USB: framing, messages and read-only discovery bi7/01: Biomek i7: ACE boards over USB: framing, messages and read-only discovery Nov 17, 2026
@cmoscy
cmoscy marked this pull request as ready for review November 17, 2026 03:49
@cmoscy
cmoscy requested a review from a team as a code owner November 17, 2026 03:49

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant